package com.dearbinge.data.service.impl.commodityBeShop;

import com.dearbinge.data.api.commodityBeShop.CommodityBeShopService;
import com.dearbinge.data.dao.CommodityBeShopMapper;
import com.dearbinge.data.pojo.commodityBeShop.CommodityBeShop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "commodityBeShopService")
public class CommodityBeShopServiceImpl implements CommodityBeShopService {

    @Autowired
    private CommodityBeShopMapper commodityBeShopMapper;

    @Override
    public Integer update(CommodityBeShop commodityBeShop) {
        Integer dataCode = commodityBeShopMapper.update(commodityBeShop);
        return dataCode;
    }

    @Override
    public Integer insert(CommodityBeShop commodityBeShop) {
        Integer dataCode = commodityBeShopMapper.insert(commodityBeShop);
        return dataCode;
    }

    @Override
    public Integer deleteByShopId(String shopId, String commodityId) {
        Integer dataCode = commodityBeShopMapper.deleteByShopId(shopId,commodityId);
        return dataCode;
    }

    @Override
    public Integer delete(Integer id) {
        Integer dataCode = commodityBeShopMapper.delete(id);
        return dataCode;
    }

    @Override
    public Integer insertArr(List<CommodityBeShop> list) {
        Integer dataCode = commodityBeShopMapper.insertArr(list);
        return dataCode;
    }
}
